//
//  NibLoadable.swift
//  Mall-swift
//
//  Created by dfpo on 2020/10/25.
//  Copyright © 2020 Bob. All rights reserved.
//

import UIKit

protocol NibLoadable {
    static var nib: UINib { get }
}

extension UITableViewCell: NibLoadable {
    class var nib: UINib {
        return UINib(nibName: String(describing: self), bundle: Bundle(for: self))
    }
}

extension UICollectionViewCell: NibLoadable {
    class var nib: UINib {
        return UINib(nibName: String(describing: self), bundle: Bundle(for: self))
    }
}
